home *** CD-ROM | disk | FTP | other *** search
/ Champak 142 / Volume 142 Oct 17 2011 - Damaged.iso / Games / operation-graduates.swf / scripts / frame_41 / DoAction_16.as < prev    next >
Text File  |  2011-10-17  |  668b  |  31 lines

  1. function hullFire()
  2. {
  3.    playSound("sound.gun1",(theHull._x - 300) / 6);
  4.    var i = 0;
  5.    while(i < 5)
  6.    {
  7.       if(this.upgrades[i] == 1)
  8.       {
  9.          p = pBullets.attachMovie("peashot" + (i + 1),"bullet" + pBulletsCount,pBulletsCount++);
  10.          p._x = this._x + eval("this.spot" + (i + 1)).x;
  11.          p._y = this._y + eval("this.spot" + (i + 1)).y;
  12.       }
  13.       i++;
  14.    }
  15.    this.ship.ha.gotoAndPlay(2);
  16.    this.firing = true;
  17.    this.firingCountdown = 4;
  18. }
  19. function bulletExecute()
  20. {
  21.    for(tb in pBullets)
  22.    {
  23.       p = pBullets[tb];
  24.       p._y -= 12;
  25.       if(p._y < 0)
  26.       {
  27.          p.removeMovieClip();
  28.       }
  29.    }
  30. }
  31.